package com.ruoyi.match.utils;

import com.ruoyi.common.utils.StringUtils;

import java.util.regex.Pattern;

/**
 * @author coderFu
 * @create 2022/4/5
 */
public class CheckMailUtils {

    public static boolean validEmail(String email){
        if(email != null && StringUtils.isNotEmpty(email)){
            return Pattern.matches("^(\\w+([-.][A-Za-z0-9]+)*){3,18}@\\w+([-.][A-Za-z0-9]+)*\\.\\w+([-.][A-Za-z0-9]+)*$", email);
        }
        return false;
    }
}
